package cn.edu.scau.cmi.suwenpeng.chapter05;

class B_exercise8 {
	int x = 100, y = 200;

	public void setX(int x) {
		x=x;
//		this.x = x;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getXYSum() {
		return x + y;
	}
}

public class A_exercise8 {

	public static void main(String[] args) {
		B_exercise8 b=new B_exercise8();
     b.setX(-100);
     b.setY(-200);
     System.out.println("sum="+b.getXYSum());
	}

}
